/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.wpi.first.wpilibj.team1662.subsystems;

import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Talon;
import edu.wpi.first.wpilibj.Victor;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.team1662.RobotMap;
import edu.wpi.first.wpilibj.team1662.commands.Drive;

/**
 *
 * @author programmer
 */
public class Drivetrain extends Subsystem{
    
    private Talon leftMotor1 = new Talon(RobotMap.leftMotor1);
    private Talon leftMotor2 = new Talon(RobotMap.leftMotor2);
    private Talon rightMotor1 = new Talon(RobotMap.rightMotor1);
    private Talon rightMotor2 = new Talon(RobotMap.rightMotor2);
    private RobotDrive robot = new RobotDrive(leftMotor1, leftMotor2, rightMotor1, rightMotor2);
    private Talon cheezit = new Talon(RobotMap.conveyorMotor);
    private Talon cheezit2 = new Talon(RobotMap.conveyorMotor2);
    private Talon pickupMotor = new Talon(RobotMap.pickupMtr);
    private Talon pickupMotor2 = new Talon(RobotMap.pickupMtr2);
    
    public void initDefaultCommand() {
        // Set the default command for a subsystem here.
        //setDefaultCommand(new MySpecialCommand());
        setDefaultCommand(new Drive());
    }
    
    public void tankDrive(double left, double right){
        robot.tankDrive(left, right);
    }
    public void cheezit(double donut){
        cheezit.set(donut);
        cheezit2.set(donut);
    }
    public double getChMotor(){
        return cheezit.getSpeed();
    }
    public void pickup(double speed){
        pickupMotor.set(speed);
        pickupMotor2.set(speed);
    }   
    public double getPickupMotor(){
        return pickupMotor.get();
    }
}